<html>
    <head>
        <title>Test</title>
        <style></style>
        <script>

const file_filter = 
   "HTML files only(*.htm,*.html)|*.htm;*.html|" +
   "SVG files only(*.svg)|*.svg|" +
   "All Files (*.*)|*.*";
   
document.on("click","button#open", function() {
    let fn = Window.this.selectFile {
        filter:file_filter,
        mode:"open",
        path: URL.toPath(__DIR__ + "load-save-file.htm")
    };
    console.log(fn);
    document.$("pre#out").innerText = fn;
    return true;
  })

document.on("click","button#save", function() {
    let fn = Window.this.selectFile({
        //filter:file_filter,
        mode:"save",
        path: URL.toPath(__DIR__ + "load-save-file.docx")
        //path: URL.toPath(__DIR__)
    });
    console.log(fn);
    document.$("pre#out").innerText = fn;
    return true;
  })


        </script>
    </head>
    <body>

<button#open>Open</button>
<button#save>Save</button>

<pre#out/>

    </body>
</html>